{% extends 'baseForIndexAndLearningPlanet.html' %}
{% load static %}
{% load cache %}
{% block title %}首页{% endblock %}
{% cache 60 'index-cache' %}
{% block left-content %}

    {% for blogObj in blogObjList %}
        <li class="container-fluid shadow-none p-3 mb-5 rounded">
            <div class="post-top container-fluid">

               {% if blogObj.isTop %}
                    <svg class="icon zhiding" aria-hidden="true">
                    <use xlink:href="#icon-zhiding"></use>
                </svg>

               {% endif %}
                <h4 class="title">{{ blogObj.title }}</h4> <span class="date"><svg class="icon" aria-hidden="true">
  <use xlink:href="#icon-riqi"></use>
</svg>:{{ blogObj.createdTime }}</span>
            </div>
            <div class="post-bottom">
                <div class="post-img" style='background-image: url({{ blogObj.background }})'></div>
                <div class="content-ri">
                    <div class="content-ri-top container-fluid">
                        <p>{{ blogObj.summary|safe }}</p>

                    </div>
                    <div class="content-ri-bottom container-fluid">
                        <span><a href="{% url 'learningPlanet:index' blog_id=blogObj.blogId %}"
                                 class="post-enter">阅读原文>></a></span>

                        <span><svg class="icon" aria-hidden="true">
  <use xlink:href="#icon-yonghu"></use>
</svg>
                            {{ blogObj.author }}</span>


                        <span><svg class="icon" aria-hidden="true">
  <use xlink:href="#icon-liulan-5"></use>
</svg>
                            {{ blogObj.total_views }}</span><span><svg class="icon" aria-hidden="true">
  <use xlink:href="#icon-icon_pinglun"></use>
</svg>{{ blogObj.total_judge }}</span>
                        <span><svg class="icon" aria-hidden="true">
  <use xlink:href="#icon-yishoucang"></use>
</svg>
                            {{ blogObj.total_collect }}</span>
                        <span><svg class="icon" aria-hidden="true">
  <use xlink:href="#icon-dianzan"></use>
</svg>
                            {{ blogObj.total_likes }}</span>
                    </div>
                </div>


            </div>


        </li>

    {% endfor %}

    <div id="page-list">
        {% load custom_paginator %}
        <span>
             {% if page.has_previous %}
                 <a href="?page={{ page.previous_page_number }}" aria-label="Previous">
                  <span aria-hidden="true">&laquo;上一页</span> </a>
             {% endif %}
			</span>
        {% autoescape off %}
            {% custom_paginator page %}
        {% endautoescape %}
        <span>
                {% if page.has_next %}
                    <a href="?page={{ page.next_page_number }}" aria-label="Next">
                  <span aria-hidden="true">下一页&raquo;</span></a>
                {% endif %}
			</span>
    </div>

{% endblock %}

{% endcache %}